<?php
//整数的算数运算
echo 123+5000,"\n";
echo 18/5,"\n";
echo 18%5,"\n"; //求余数
echo @(18.9%5.1),"\n"; //两边的数据会转换为整数，再求余数
echo 3**2,"\n"; //3的平方
//优先级及结合性
echo 5-2*6,"\n"; //-7， 先算乘除，后算加减
echo (-3)**2,"\n";
echo 8/2*3,"\n"; //优先级相同时，看结合性
//不同类型间的数据计算
echo "100000"+234,"\n";
echo 234+"100000","\n";
echo "100000"+'234',"\n";
echo "100000"+'0o234',"\n"; //不识别字符串形式的2进制，8进制和16进制
echo "100000"+'0x2A',"\n";
echo "100000"+'123aaa',"\n";
echo "100000"+'-2e2aaa',"\n";
echo "100000"+'aaa',"\n"; //Fatal error
//浮点数
echo 3.14,"\n";
echo 3.14e5,"\n"; //科学计数法
//echo 0o12.34,"\n"; //不识别2、8、16进制的数据
echo fmod(18.9,5.1),"\n"; //两边的数据会转换为整数，再求余数



